package server;

public class newConnection extends Thread {

	private String confPort, port, aPort, aIp;


	public newConnection(String confPort, String port, String aPort, String aIp) throws Exception {
		this.confPort = confPort;
		this.port = port;
		this.aIp = aIp;
		this.aPort = aPort;
	}

	public void run() {
//		System.out.println(port + " " + confPort);
		if(!port.equals(confPort))
			Command.openUrl("http://localhost:"+ confPort +"/ADDME?adr=:" + port);
		else if(!aIp.equals("0") && !aPort.equals("0"))
			Command.openUrl("http://"+ aIp+":"+ aPort +"/ADDME?adr=:" + port);
	}

}